home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / ADSPSecure.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  3.8 KB  |  92 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ADSPSecure.a
  3. ;
  4. ;    Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__ADSPSECURE__') = 'UNDEFINED' THEN
  19. __ADSPSECURE__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
  25.     include 'ADSP.a'
  26.     ENDIF
  27.     IF &TYPE('__OCEAUTHDIR__') = 'UNDEFINED' THEN
  28.     include 'OCEAuthDir.a'
  29.     ENDIF
  30.  
  31. ;  New ADSP control codes
  32. ;
  33. ; * open a secure connection 
  34.  
  35.  
  36. sdspOpen                        EQU        229
  37. ;For secure connections, the eom field of ioParams contains two single-bit flags
  38. ;(instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  39. ;eom flag.  All other bits in that field should be zero.
  40. ;
  41. ;To write an encrypted message, you must set an encrypt bit in the eom field of
  42. ;the ioParams of your write call. Note: this flag is only checked on the first
  43. ;write of a message (the first write on a connection, or the first write following
  44. ;a write with eom set.
  45. ;
  46.  
  47.  
  48. dspEOMBit                        EQU        0                    ; set if EOM at end of write 
  49. dspEncryptBit                    EQU        1                    ; set to encrypt message 
  50.  
  51. dspEOMMask                        EQU        $01
  52. dspEncryptMask                    EQU        $02
  53.  
  54. ;Define an ADSPSecure parameter block, as used for the secure Open call.
  55. ;
  56. ; * size of ADSPSecure workspace 
  57.  
  58.  
  59. sdspWorkSize                    EQU        2048
  60. TRSecureParams            RECORD 0
  61. localCID                 ds.w    1                ; offset: $0 (0)        ;  local connection id 
  62. remoteCID                 ds.w    1                ; offset: $2 (2)        ;  remote connection id 
  63. remoteAddress             ds        AddrBlock        ; offset: $4 (4)        ;  address of remote end 
  64. filterAddress             ds        AddrBlock        ; offset: $8 (8)        ;  address filter 
  65. sendSeq                     ds.l    1                ; offset: $C (12)        ;  local send sequence number 
  66. sendWindow                 ds.w    1                ; offset: $10 (16)        ;  send window size 
  67. recvSeq                     ds.l    1                ; offset: $12 (18)        ;  receive sequence number 
  68. attnSendSeq                 ds.l    1                ; offset: $16 (22)        ;  attention send sequence number 
  69. attnRecvSeq                 ds.l    1                ; offset: $1A (26)        ;  attention receive sequence number 
  70. ocMode                     ds.b    1                ; offset: $1E (30)        ;  open connection mode 
  71. ocInterval                 ds.b    1                ; offset: $1F (31)        ;  open connection request retry interval 
  72. ocMaximum                 ds.b    1                ; offset: $20 (32)        ;  open connection request retry maximum 
  73. secure                     ds.b    1                ; offset: $21 (33)        ;   --> TRUE if session was authenticated 
  74. sessionKey                 ds.l    1                ; offset: $22 (34)        ;  <--> encryption key for session 
  75. credentialsSize             ds.l    1                ; offset: $26 (38)        ;   --> length of credentials 
  76. credentials                 ds.l    1                ; offset: $2A (42)        ;   --> pointer to credentials 
  77. workspace                 ds.l    1                ; offset: $2E (46)        ;   --> pointer to workspace for connection align on even boundary and length = sdspWorkSize 
  78. recipient                 ds.l    1                ; offset: $32 (50)        ;   --> identity of recipient (or initiator if active mode 
  79. issueTime                 ds.l    1                ; offset: $36 (54)        ;   --> when credentials were issued 
  80. expiry                     ds.l    1                ; offset: $3A (58)        ;   --> when credentials expiry 
  81. initiator                 ds.l    1                ; offset: $3E (62)        ;  <--  RecordID of initiator returned here. Must give appropriate Buffer to hold RecordID (Only for passive or accept mode) 
  82. hasIntermediary             ds.b    1                ; offset: $42 (66)        ;  <--  will be set if credentials has an intermediary 
  83. filler1                     ds.b    1                ; offset: $43 (67)
  84. intermediary             ds.l    1                ; offset: $44 (68)        ;  <--  RecordID of intermediary returned here. (If intermediary is found in credentials Must give appropriate Buffer to hold RecordID (Only for passive or accept mode) 
  85. sizeof                     EQU *                    ; size:   $48 (72)
  86.                         ENDR
  87.  
  88.     ENDIF ; __ADSPSECURE__ 
  89.  
  90.